package com.class05._super.easy;

import java.util.HashMap;
/**
 * @ClassDescription:
 * @JdkVersion: 17
 * @Author: yxy
 * @Created: 2024/4/9 10:52
 */
public class TestMain {
    public static void main(String[] args) {
        HouseCar houseCar = new HouseCar();
        houseCar.engine = new Engine(99999.99, 5, 1000, 100);
        houseCar.engine.powerShow(100000);
        int speed  = houseCar.engine.speed;
        //子类方法
        houseCar.eat();
        houseCar.sleep();
        houseCar.running();
        houseCar.protect();
//        因为父类方法是private
//        houseCar.live();

        System.out.println("==========");
        new MatchCar().match();
//  a.子类可以继承父类中私有和非私有成员,但是不能使用父类中私有成员
//        houseCar.color = "红色";
//  b.构造方法不能继承
//        this("红色","1000");

    }
}
